linux: Restore time on APs if they are not hotplugged on save/restore.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 7 Mar 2007 16:21:21 +0000 (16:21 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 7 Mar 2007 16:21:21 +0000 (16:21 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c

index 9dc489b404d4659ac1f918692f313ae0af45bb49..b57ab9bdfe9ce9225055aff37264026a0a508470 100644 (file)
@@ -1022,16 +1022,21 @@ void halt(void)
 }
 EXPORT_SYMBOL(halt);
 
-/* No locking required. We are only CPU running, and interrupts are off. */
+/* No locking required. Interrupts are disabled on all CPUs. */
 void time_resume(void)
 {
+       unsigned int cpu;
+
        init_cpu_khz();
 
-       get_time_values_from_xen(0);
+       for_each_online_cpu(cpu) {
+               get_time_values_from_xen(cpu);
+               per_cpu(processed_system_time, cpu) =
+                       per_cpu(shadow_time, 0).system_timestamp;
+               init_missing_ticks_accounting(cpu);
+       }
 
        processed_system_time = per_cpu(shadow_time, 0).system_timestamp;
-       per_cpu(processed_system_time, 0) = processed_system_time;
-       init_missing_ticks_accounting(0);
 
        update_wallclock();
 }